-- Anything that would be logged would be passed to this.
	
function CAKE.DayLog( Type, text )
	if Type != "MYSQLError" then
		CAKE.mysqlLog(Type, text)
	else
		local filedir = CAKE.Name .. "/logs/daylogs/" .. os.date("%D") .. "/" .. outputfile;
		local old = CAKE.NilFix(file.Read( filedir ), "");
		text = string.gsub(text, "\n", ""); -- \n fix for all those basteds. >:O
		file.Write( filedir, old .. "\n" .. os.date("%t") .. " " .. text );
	end
end

function CAKE.myqlLog( Type, text )
	CAKE.MYSQLQuery('INSERT INTO Logs (Date, Time, Type, Text) VALUES (' ..os.date("%D") ..', '.. os.date("%t")..',' .. Type ..', '.. text .. ')')	
end